<?php
namespace App\Controller;
class IndexController extends HomeController {
    public function index(){
            //var_dump(123);exit;
        $data = array(
            'account' => C('APP_TOKEN_ACCOUNT'),
            'password' => C('APP_TOKEN_PASSWORD')
        );
        $url = 'http://nantong.59156.cn';
        $result = $this -> http_post_data($url.'/App/Public/send_token',json_encode($data),C('APP_TOKEN_HEADER'));
        $res = json_decode($result[1],true);


   //    $das['username'] ='张三';
     //  $das['imgarr'] ='3,2';
     //  $das['content'] ='这个地砖铺的很好哦，这个师傅技术精湛。';
      // $das['project_id'] =1;
      // $das['uid'] =1;
     //  $das['id'] =7;
       $das['type'] =1;
       $das['id'] =5;
      // $das['project_id'] =1;
       //$das['page'] =1;
       //$das['num'] =10;
      // $das['title'] ='春晖';

       $resu = $this -> http_post_data($url.'/App/Project/gongxu',json_encode($das),$res['token']);
       $mm = json_decode($resu[1],true);

        p($mm);

     }


   
}